package com.kehutong.contact.entity;

import com.kehutong.common.enums.Gender;
import com.kehutong.contact.enums.BindType;
import com.kehutong.contact.enums.HouseType;
import com.kehutong.contact.enums.RelationType;
import com.kehutong.contact.enums.ResidentType;
import org.coraframework.bean.valid.CheckField;
import org.coraframework.json.annotation.JSONField;
import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.annotation.UnSave;

import java.time.LocalDateTime;

/**
 * 住户房屋信息实体类
 */
@Table(value="t_resident_house", comment="住户房屋信息", multi=true)
public class ResidentHouse extends Entity {

	private static final long serialVersionUID = -204131018664727070L;

	protected ResidentHouse(String id) {
		super(id);
	}

	@CheckField("住户编号不能为空")
	@Column(comment = "住户编号")
	private String residentNo;

	@Column(comment = "房屋类型")
	private HouseType houseType;

	@Column(length = 255, comment = "头像")
	private String avatar;

	/** 冗余住户真实姓名*/
	@Column(comment="真实姓名")
	private String realname;

	/** 冗余住户手机号*/
	@Column(comment="手机号")
	private String mobile;

	@Column(comment="小区编号")
	private String communityNo;

	@Column(comment="小区名称")
	private String communityName;

	@Column(comment = "小区别名")
	private String communityViewName;

	@Column(comment="楼栋编号|店铺分类编号|车位分类编号")
	private String buildNo;

	@Column(comment="楼栋名称|店铺分类名称|车位分类编号")
	private String buildName;

	@Column(comment = "楼栋别名|店铺分类别名|车位分类别名")
	private String buildViewName;

	@Column(comment="单元名称")
	private String unitName;

	@Column(comment="楼层名称")
	private String floorName;

	@CheckField("房屋编号不能为空")
	@Column(comment = "房屋编号|商铺编号|车位编号")
	private String houseNo;

	@CheckField("房屋名称不能为空")
	@Column(comment = "房屋名称|商铺名称|车位名称")
	private String houseName;

	@Column(comment = "房屋别名|商铺别名|车位别名")
	private String houseViewName;

	@Column(comment = "住户身份")
	private ResidentType type;

	@Column(comment = "与业主关系")
	private RelationType relationType;

	@Column(comment = "所属上级")
	private String pid;

	@Column(comment = "所属上级名称")
	private String pname;

	@Column(comment = "租赁开始时间")
	private LocalDateTime startTime;

	@Column(comment = "租赁结束时间")
	private LocalDateTime endTime;

	@Column(comment = "绑定类型")
	private BindType bindType;

	@Column(comment = "绑定时间")
	private LocalDateTime bindTime;

	@Column(comment = "解绑|失效时间")
	private LocalDateTime unBindTime;

	@Column(comment = "公司编号")
	private String companyNo;

	@JSONField(serialize = false)
	@Column(comment = "逻辑删除")
	private boolean deleted;

	@Column(comment = "拥有者编号")
	private String ownerNo;

    @UnSave
	private Gender gender;

	@UnSave
	private String cardNo;

	@UnSave
	private LocalDateTime birthDay;

	@UnSave
	private String address;

	@UnSave
	private String remark;

	@UnSave
	private String email;

	@UnSave
	private String offerName;


	public String getOwnerNo() {
		return ownerNo;
	}

	public void setOwnerNo(String ownerNo) {
		this.ownerNo = ownerNo;
	}

	/** 业主类型所在房屋下面的住户数量(只有是业主当前字段才会处理)*/
	private Integer count;

	public String getResidentNo() {
		return residentNo;
	}

	public void setResidentNo(String residentNo) {
		this.residentNo = residentNo;
	}

	public HouseType getHouseType() {
		return houseType;
	}

	public void setHouseType(HouseType houseType) {
		this.houseType = houseType;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getCommunityNo() {
		return communityNo;
	}

	public void setCommunityNo(String communityNo) {
		this.communityNo = communityNo;
	}

	public String getCommunityName() {
		return communityName;
	}

	public void setCommunityName(String communityName) {
		this.communityName = communityName;
	}

	public String getBuildNo() {
		return buildNo;
	}

	public void setBuildNo(String buildNo) {
		this.buildNo = buildNo;
	}

	public String getBuildName() {
		return buildName;
	}

	public void setBuildName(String buildName) {
		this.buildName = buildName;
	}

	public String getUnitName() {
		return unitName;
	}

	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}

	public String getHouseNo() {
		return houseNo;
	}

	public void setHouseNo(String houseNo) {
		this.houseNo = houseNo;
	}

	public String getHouseName() {
		return houseName;
	}

	public void setHouseName(String houseName) {
		this.houseName = houseName;
	}

	public ResidentType getType() {
		return type;
	}

	public void setType(ResidentType type) {
		this.type = type;
	}

	public LocalDateTime getStartTime() {
		return startTime;
	}

	public void setStartTime(LocalDateTime startTime) {
		this.startTime = startTime;
	}

	public LocalDateTime getEndTime() {
		return endTime;
	}

	public void setEndTime(LocalDateTime endTime) {
		this.endTime = endTime;
	}


	public BindType getBindType() {
		return bindType;
	}

	public void setBindType(BindType bindType) {
		this.bindType = bindType;
	}

	public String getCompanyNo() {
		return companyNo;
	}

	public void setCompanyNo(String companyNo) {
		this.companyNo = companyNo;
	}

	public boolean isDeleted() {
		return deleted;
	}

	public RelationType getRelationType() {
		return relationType;
	}

	public void setRelationType(RelationType relationType) {
		this.relationType = relationType;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getPname() {
		return pname;
	}

	public void setPname(String pname) {
		this.pname = pname;
	}

	public LocalDateTime getBindTime() {
		return bindTime;
	}

	public void setBindTime(LocalDateTime bindTime) {
		this.bindTime = bindTime;
	}

	public LocalDateTime getUnBindTime() {
		return unBindTime;
	}

	public void setUnBindTime(LocalDateTime unBindTime) {
		this.unBindTime = unBindTime;
	}

	public Gender getGender() {
		return gender;
	}

	public void setGender(Gender gender) {
		this.gender = gender;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public LocalDateTime getBirthDay() {
		return birthDay;
	}

	public void setBirthDay(LocalDateTime birthDay) {
		this.birthDay = birthDay;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public String getCommunityViewName() {
		return communityViewName;
	}

	public void setCommunityViewName(String communityViewName) {
		this.communityViewName = communityViewName;
	}

	public String getBuildViewName() {
		return buildViewName;
	}

	public void setBuildViewName(String buildViewName) {
		this.buildViewName = buildViewName;
	}

	public String getHouseViewName() {
		return houseViewName;
	}

	public void setHouseViewName(String houseViewName) {
		this.houseViewName = houseViewName;
	}

	public String getFloorName() {
		return floorName;
	}

	public void setFloorName(String floorName) {
		this.floorName = floorName;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getOfferName() {
		return offerName;
	}

	public void setOfferName(String offerName) {
		this.offerName = offerName;
	}
}
